<template>
<div class="wrap">
<xcl-header :show="loading.show" :call-back="()=>{}" :page-title="pageTitle" :header-right="headerRight"></xcl-header>
<!--产品列表-->
<div class="content" id="content2" transition="fade" v-show="screen">
	<div v-if="topics.length === 0  && loading.show === false" >
      <div class="no-data">暂无数据</div>
    </div>

    <div class="card" v-for="i in topics">
        <div class="card-header">{{i.t}}</div>
        <div class="card-content">
        <div class="card-content-inner">
            {{{i.d}}}
        </div>
        </div>
        <div class="card-footer">{{i.a||'---'}}</div>
  </div>
</div>
<xcl-loading :show="loading.show" :show-txt="loading.showTxt"></xcl-loading> 
</div>
</template>
<script>
  import xclHeader from '../components/header.vue'
  import xclLoading from '../components/loading.vue'
  let consult_proxy =  require("../proxy/consult_proxy");
  let consult = new consult_proxy();
  export default {
        data (){
            return {
                scroll:true,
                screen:true,
                pageTitle:'正文',
                headerRight:'',
                myFollow:[],
                nodata:false,
                login:true,
                topics:[],
                id:this.$route.params.id,
                 loading:{
                    show:false
                }
            }
        },
        route:{
           
        },
        ready (){
           //页面初次加载获取的数据
            this.getTopics();
          
        },
        methods:{
        	//获取产品列表
            getTopics (){
                var _this=this;
                var Sid=new Array();
                _this.loading.show = true;                 
                consult.getJournalismtById(_this.id,function(data){
                	if(data.code==200&&data.results&&data.results.length){
                        _this.scroll = true;
                        _this.topics=_this.topics.concat(data.results);
                	}else{
                		_this.nodata = true;
                	}
                	_this.loading.show = false;  
                })
            },
           
          
           
          
        },
        components:{
           "xclHeader":xclHeader,
           "xclLoading":xclLoading
        }
  }
</script>
<style lang="stylus">
.intro p
  text-indent 2em
.card-title{
	padding:0.3rem 0.5rem;
	font-size:0.75rem;
}
.screen-item{
	background:#f2f2f2;
    color: #111;
    text-decoration: none;
    text-align: center;
    display: block;
    border-radius: .25rem;
    line-height: 1.8rem;
    box-sizing: border-box;   
    padding: 0 .5rem;
    margin: 0 0 0.5rem 0;
    height: 1.8rem;
    white-space: nowrap;
    position: relative;
    text-overflow: ellipsis;
    font-size: .7rem;
    font-family: inherit;
    cursor: pointer;
}
.active-item{
	color:#fff;
	background-color:#e76364 !important;
}
.follow{
	color:#F00;
}
.no-data-load
  padding:0.3rem 0 0.5rem
  font-size:0.75rem
  text-align:center  
  color:#ccc  
</style>
